<template>
  <div class="app-container">
    <Ht-search-form
      v-show="showSearch"
      :advOptions="[]"
      :dictMap="dictMap"
      :formOptions="formOptions"
      :outputQueryParams="queryParams"
      :queryParams="queryParams"
      :defaultEventKey="defaultEventKey"
      :labelWidth="75"
    ></Ht-search-form>

    <ht-table
      :defaultEventKey="defaultEventKey"
      ref="dataTable"
      :dictMap="dictMap"
      :multi-select="false"
      :opButtonList="opButtonList"
      :queryParams="queryParams"
      :reqConfig="regConfig"
      :showSerialNumber="false"
      :tableBindColumns="tableBindColumns"
      :randomRowKey="true"
    >
      <template v-slot:operate>
        <el-table-column align="left" fixed="right" label="操作" width="120">
          <template slot-scope="scope">
            <ht-button-group
              :buttonList="[
                {
                  label: '明细',
                  doFunc: () => {
                    resDetail(scope.row);
                  },
                },
                {
                  label: '原交易明细',
                  visible: scope.row.oriId !== undefined && scope.row.drct !== undefined,
                  doFunc: () => {
                    handleAction('detail', scope.row);
                  },
                },
              ]"
            />
          </template>
        </el-table-column>
      </template>
    </ht-table>

    <!-- 添加或修改弹出框 -->
    <el-dialog
      :close-on-click-modal="false"
      :title="title"
      center
      :visible.sync="open"
      v-if="open"
      append-to-body
      width="1024px"
    >
      <el-form ref="detailForm" :model="detailForm" label-width="140px">
        <div slot="header" class="label-header-msg">
          <span></span>
        </div>
        <el-card class="form-card txnInfo-card">
          <div slot="header" class="label-header-msg">
            <span>基本信息</span>
          </div>
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="交易流水号" prop="id">
                <el-input v-model="detailForm.id" :disabled="true" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="报文标识号" prop="pkgId">
                <el-input v-model="detailForm.pkgId" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="批序号" prop="batchNo">
                <el-input v-model="detailForm.batchNo" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="CPG日期" prop="cpgdate">
                <el-date-picker
                  v-model="detailForm.cpgdate"
                  style="width: 100%"
                  type="date"
                  value-format="yyyyMMdd"
                  :disabled="true"
                />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="工作日期" prop="workdate">
                <el-date-picker
                  v-model="detailForm.workdate"
                  style="width: 100%"
                  type="date"
                  value-format="yyyyMMdd"
                  :disabled="true"
                />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="业务类型" prop="bizTypeCode">
                <el-select v-model="detailForm.bizTypeCode" placeholder="业务类型" disabled>
                  <el-option
                    v-for="dict in dictMap.BIZ_TYPE"
                    :key="dict.value"
                    :label="`${dict.value}-${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="业务种类" prop="bizCtgyCode">
                <el-select v-model="detailForm.bizCtgyCode" placeholder="业务种类" disabled>
                  <el-option
                    v-for="dict in dictMap.BIZ_CTGY"
                    :key="dict.value"
                    :label="`${dict.value}-${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="来往账标识" prop="drct">
                <el-select style="width: 100%" v-model="detailForm.drct" placeholder="来往账标识" :disabled="true">
                  <el-option
                    v-for="dict in dictMap.DRCTCODE"
                    :key="dict.value"
                    :label="`${dict.value}-${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="协议号" prop="protoId">
                <el-input v-model="detailForm.protoId" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="货币种类" prop="curcd">
                <el-input v-model="detailForm.curcd" :disabled="true" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="金额" prop="amount">
                <ht-amount-input v-model="detailForm.amount" placeholder="金额" :disable="true"></ht-amount-input>
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="统一社会信用代码" prop="uniformScCode">
                <el-input v-model="detailForm.uniformScCode" :disabled="true" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="地域标识" prop="regionid">
                <el-select v-model="detailForm.regionid" placeholder="地域标识编号" disabled>
                  <el-option
                    v-for="dict in dictMap.RegionId"
                    :key="dict.value"
                    :label="`${dict.value}-${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex" v-if="detailForm.bizTypeCode==='C209'">
            <el-col :span="12">
              <el-form-item label="征收机关代码" prop="orgId">
                <el-input v-model="detailForm.orgId" :disabled="true" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="征收机关提交日期" prop="orgCmDate">
                <el-date-picker
                  v-model="detailForm.orgCmDate"
                  style="width: 100%"
                  type="date"
                  value-format="yyyyMMdd"
                  :disabled="true"
                />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex" v-if="detailForm.bizTypeCode==='C209'">
            <el-col :span="12">
              <el-form-item label="征收机关流水号" prop="orgNo">
                <el-input v-model="detailForm.orgNum" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>
        </el-card>

        <el-card class="form-card txnInfo-card">
          <div slot="header" class="label-header-msg">
            <span>付款人信息</span>
          </div>
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="付款行行号" prop="payerBrno">
                <el-input v-model="detailForm.payerBrno" :disabled="true" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="付款行行名" prop="payerBrname">
                <el-input v-model="detailForm.payerBrname" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="付款清算行行号" prop="payerStBrno">
                <el-input v-model="detailForm.payerStBrno" :disabled="true" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="付款清算行行名" prop="payerStBrname">
                <el-input v-model="detailForm.payerStBrname" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="付款人账号" prop="payerActno">
                <el-input v-model="detailForm.payerActno" :disabled="true" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="付款人名称" prop="payerName">
                <el-input v-model="detailForm.payerName" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="付款客户标识" prop="payerId">
                <el-input v-model="detailForm.payerId" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="付款方动账标识" prop="payerAccChgFlg">
                <el-select
                  style="width: 100%"
                  v-model="detailForm.payerAccChgFlg"
                  placeholder="付款方动账标识"
                  :disabled="true"
                >
                  <el-option
                    v-for="dict in dictMap.Acc_Chg_Flg_Code"
                    :key="dict.value"
                    :label="`${dict.value}-${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="扣款通知编号" prop="dbtNo">
                <el-input v-model="detailForm.dbtNo" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex" v-if="detailForm.bizTypeCode==='D200'">
            <el-col :span="12">
              <el-form-item label="付款人客户结算名称" prop="payerInName">
                <el-input v-model="detailForm.payerInName" :disabled="true" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="付款人客户结算账号" prop="payerInActno">
                <el-input v-model="detailForm.payerInActno" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>
        </el-card>

        <el-card class="form-card txnInfo-card">
          <div slot="header" class="label-header-msg">
            <span>收款人信息</span>
          </div>
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="收款行行号" prop="payeeBrno">
                <el-input v-model="detailForm.payeeBrno" :disabled="true" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="收款行行名" prop="payeeBrname">
                <el-input v-model="detailForm.payeeBrname" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="收款清算行行号" prop="payeeStBrno">
                <el-input v-model="detailForm.payeeStBrno" :disabled="true" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="收款清算行行名" prop="payeeStBrname">
                <el-input v-model="detailForm.payeeStBrname" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="收款人账号" prop="payeeActno">
                <el-input v-model="detailForm.payeeActno" :disabled="true" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="收款人名称" prop="payeeName">
                <el-input v-model="detailForm.payeeName" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="收款方金融账户标识" prop="payeeAccFlg">
                <el-input v-model="detailForm.payeeAccFlg" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="收款方动账标识" prop="payeeAccChgFlg">
                <el-select
                  style="width: 100%"
                  v-model="detailForm.payeeAccChgFlg"
                  placeholder="收款方动账标识"
                  :disabled="true"
                >
                  <el-option
                    v-for="dict in dictMap.Acc_Chg_Flg_Code"
                    :key="dict.value"
                    :label="`${dict.value}-${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="入账通知编号" prop="crdNo">
                <el-input v-model="detailForm.crdNo" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex" v-if="detailForm.bizTypeCode==='C209'">
            <el-col :span="12">
              <el-form-item label="收款人客户结算名称" prop="payeeInName">
                <el-input v-model="detailForm.payeeInName" :disabled="true" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="收款人客户结算账号" prop="payeeInActno">
                <el-input v-model="detailForm.payeeInActno" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>
        </el-card>

        <el-card class="form-card txnInfo-card">
          <div slot="header" class="label-header-msg">
            <span>其他信息</span>
          </div>
          <el-row type="flex">
            <el-col :span="24" v-if="detailForm.bizTypeCode==='D200'">
              <el-form-item label="退汇原因" prop="retnContent">
                <el-input type="textarea" v-model="detailForm.retnContent" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="24">
              <el-form-item label="备注" prop="remarks">
                <el-input type="textarea" v-model="detailForm.remarks" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="中心状态" prop="procStatus">
                <el-select style="width: 100%" v-model="detailForm.procStatus" placeholder="中心状态" :disabled="true">
                  <el-option
                    v-for="dict in dictMap.PROCESSSTATUS"
                    :key="dict.value"
                    :label="`${dict.value}-${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="业务状态" prop="txnStatus">
                <el-select style="width: 100%" v-model="detailForm.txnStatus" placeholder="业务状态" :disabled="true">
                  <el-option
                    v-for="dict in dictMap.TXN_STATUS"
                    :key="dict.value"
                    :label="`${dict.value}-${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="核验标识" prop="checkId">
                <el-select style="width: 100%" v-model="detailForm.checkId" placeholder="核验标识" :disabled="true">
                  <el-option
                    v-for="dict in dictMap.CHECKFLAG"
                    :key="dict.value"
                    :label="`${dict.value}-${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="接收时间" prop="rcvTime">
                <el-date-picker
                  style="width: 100%"
                  v-model="detailForm.rcvTime"
                  value-format="yyyyMMddHHmmss"
                  type="datetime"
                  :disabled="true"
                />
              </el-form-item>
            </el-col>
          </el-row>
        </el-card>
      </el-form>

      <div slot="footer" align="center" class="dialog-footer">
        <el-button type="primary" @click="cancel">关 闭</el-button>
      </div>
    </el-dialog>

    <el-dialog
      :close-on-click-modal="false"
      :title="restitle"
      :visible.sync="resopen"
      v-if="resopen"
      center
      append-to-body
      width="1024px"
    >
      <el-form ref="resdetailForm" :model="resdetailForm" label-width="180px" :disabled="true">
        <div slot="header" class="label-header-msg">
          <span></span>
        </div>
        <el-card class="form-card txnInfo-card">
          <div slot="header" class="label-header-msg">
            <span>基本信息</span>
          </div>
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="交易流水号" prop="id">
                <el-input v-model="resdetailForm.id" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="报文标识号" prop="pkgId">
                <el-input v-model="resdetailForm.pkgId" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="CPG日期" prop="cpgdate">
                <el-date-picker
                  v-model="resdetailForm.cpgdate"
                  style="width: 100%"
                  type="date"
                  value-format="yyyyMMdd"
                />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="工作日期" prop="workdate">
                <el-date-picker
                  v-model="resdetailForm.workdate"
                  style="width: 100%"
                  type="date"
                  value-format="yyyyMMdd"
                />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="业务类型" prop="bizTypeCode">
                <el-select v-model="resdetailForm.bizTypeCode" placeholder="业务类型" disabled>
                  <el-option
                    v-for="dict in dictMap.BIZ_TYPE"
                    :key="dict.value"
                    :label="`${dict.value}-${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="业务种类" prop="bizCtgyCode">
                <el-select v-model="resdetailForm.bizCtgyCode" placeholder="业务种类" disabled>
                  <el-option
                    v-for="dict in dictMap.BIZ_CTGY"
                    :key="dict.value"
                    :label="`${dict.value}-${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="来往账标识" prop="drct">
                <el-select style="width: 100%" v-model="resdetailForm.drct" placeholder="来往账标识">
                  <el-option
                    v-for="dict in dictMap.DRCTCODE"
                    :key="dict.value"
                    :label="`${dict.value}-${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="金额" prop="amount">
                <ht-amount-input v-model="resdetailForm.amount" placeholder="金额" :disable="true"></ht-amount-input>
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="货币种类" prop="curcd">
                <el-input v-model="resdetailForm.curcd" />
              </el-form-item>
            </el-col>
          </el-row>
        </el-card>

        <el-card class="form-card txnInfo-card">
          <div slot="header" class="label-header-msg">
            <span>原交易信息</span>
          </div>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="原交易流水号" prop="oriId">
                <el-input v-model="resdetailForm.oriId" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="原报文标识号" prop="oriPkgId">
                <el-input v-model="resdetailForm.oriPkgId" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="原批序号" prop="oriBatchNo">
                <el-input v-model="resdetailForm.oriBatchNo" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="原明细标识号" prop="oriDtlNo">
                <el-input v-model="resdetailForm.oriDtlNo" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="原发起参与机构" prop="oriSender">
                <el-input v-model="resdetailForm.oriSender" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="原发起参与机构名" prop="oriSenderName">
                <el-input v-model="resdetailForm.oriSenderName" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="原交易收款人客户结算账号" prop="payeeInActno">
                <el-input v-model="resdetailForm.payeeInActno" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="原交易收款人客户结算名称" prop="payeeInName">
                <el-input v-model="resdetailForm.payeeInName" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="原交易收款方统一社会信用代码" prop="orgUniformScCode">
                <el-input v-model="resdetailForm.orgUniformScCode" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="原交易地域标识" prop="orgRegionid">
                <el-select v-model="resdetailForm.orgRegionid" placeholder="原交易地域标识" disabled>
                  <el-option
                    v-for="dict in dictMap.RegionId"
                    :key="dict.value"
                    :label="`${dict.value}-${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="原交易收款方动账标识" prop="orgPayeeAccChgFlg">
                <el-select
                  style="width: 100%"
                  v-model="resdetailForm.orgPayeeAccChgFlg"
                  placeholder="原交易收款方动账标识"
                >
                  <el-option
                    v-for="dict in dictMap.Acc_Chg_Flg_Code"
                    :key="dict.value"
                    :label="`${dict.value}-${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="原交易收款方入账通知编号" prop="orgCrdNo">
                <el-input v-model="resdetailForm.orgCrdNo" />
              </el-form-item>
            </el-col>
          </el-row>
        </el-card>

        <el-card class="form-card txnInfo-card">
          <div slot="header" class="label-header-msg">
            <span>付款人信息</span>
          </div>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="付款行行号" prop="payerBrno">
                <el-input v-model="resdetailForm.payerBrno" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="付款行行名" prop="payerBrname">
                <el-input v-model="resdetailForm.payerBrname" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="付款人账号" prop="payerActno">
                <el-input v-model="resdetailForm.payerActno" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="付款人名称" prop="payerName">
                <el-input v-model="resdetailForm.payerName" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="付款客户标识" prop="payerId">
                <el-input v-model="resdetailForm.payerId" />
              </el-form-item>
            </el-col>
          </el-row>
        </el-card>

        <el-card class="form-card txnInfo-card">
          <div slot="header" class="label-header-msg">
            <span>收款人信息</span>
          </div>
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="收款行行号" prop="payeeBrno">
                <el-input v-model="resdetailForm.payeeBrno" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="收款行行名" prop="payeeBrname">
                <el-input v-model="resdetailForm.payeeBrname" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="收款人账号" prop="payeeActno">
                <el-input v-model="resdetailForm.payeeActno" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="收款人名称" prop="payeeName">
                <el-input v-model="resdetailForm.payeeName" />
              </el-form-item>
            </el-col>
          </el-row>
        </el-card>

        <el-card class="form-card txnInfo-card">
          <div slot="header" class="label-header-msg">
            <span>NPC处理信息</span>
          </div>
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="处理码" prop="procCode">
                <el-input v-model="resdetailForm.procCode" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="拒绝信息" prop="rejectInfo">
                <el-input v-model="resdetailForm.rejectInfo" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="轧差日期" prop="chkDate">
                <el-date-picker
                  v-model="resdetailForm.chkDate"
                  style="width: 100%"
                  type="date"
                  value-format="yyyyMMdd"
                />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="轧差场次" prop="chkRound">
                <el-input v-model="resdetailForm.chkRound" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="清算日期" prop="clrDate">
                <el-date-picker
                  v-model="resdetailForm.clrDate"
                  style="width: 100%"
                  type="date"
                  value-format="yyyyMMdd"
                />
              </el-form-item>
            </el-col>
          </el-row>
        </el-card>

        <el-card class="form-card txnInfo-card">
          <div slot="header" class="label-header-msg">
            <span>应答信息</span>
          </div>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="业务回执状态" prop="bizStatus">
                <el-select style="width: 100%" v-model="resdetailForm.bizStatus" placeholder="业务回执状态">
                  <el-option
                    v-for="dict in dictMap.PROCESSSTATUS"
                    :key="dict.value"
                    :label="`${dict.value}-${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="业务拒绝处理码" prop="bizRejectCode">
                <el-select v-model="resdetailForm.bizRejectCode" placeholder="业务拒绝处理码" disabled>
                  <el-option
                    v-for="dict in dictMap['Cnaps2Dict.REJECTCODE']"
                    :key="dict.value"
                    :label="`${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="24">
              <el-form-item label="业务拒绝信息" prop="bizRejectInfo">
                <el-input type="textarea" v-model="resdetailForm.bizRejectInfo" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="业务处理参与机构" prop="bizProOrg">
                <el-input v-model="resdetailForm.bizProOrg" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="业务处理参与机构名" prop="bizProOrgName">
                <el-input v-model="resdetailForm.bizProOrgName" />
              </el-form-item>
            </el-col>
          </el-row>
        </el-card>

        <el-card class="form-card txnInfo-card">
          <div slot="header" class="label-header-msg">
            <span>其他信息</span>
          </div>
          <el-row type="flex">
            <el-col :span="24">
              <el-form-item label="备注" prop="remarks">
                <el-input type="textarea" v-model="resdetailForm.remarks" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="中心状态" prop="procStatus">
                <el-select style="width: 100%" v-model="resdetailForm.procStatus" placeholder="中心状态">
                  <el-option
                    v-for="dict in dictMap.PROCESSSTATUS"
                    :key="dict.value"
                    :label="`${dict.value}-${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="通讯状态" prop="status">
                <el-select style="width: 100%" v-model="resdetailForm.status" placeholder="通讯状态">
                  <el-option
                    v-for="dict in dictMap.PKG_STATUS"
                    :key="dict.value"
                    :label="`${dict.value}-${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="发送时间" prop="sndTime">
                <el-date-picker
                  style="width: 100%"
                  v-model="resdetailForm.sndTime"
                  value-format="yyyyMMddHHmmss"
                  type="datetime"
                />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="接收时间" prop="rcvTime">
                <el-date-picker
                  style="width: 100%"
                  v-model="resdetailForm.rcvTime"
                  value-format="yyyyMMddHHmmss"
                  type="datetime"
                />
              </el-form-item>
            </el-col>
          </el-row>
        </el-card>
      </el-form>

      <div slot="footer" align="center" class="dialog-footer">
        <el-button type="primary" @click="rescancel">关 闭</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import {
  apiUrlConfigQuery,
  realtimeCollectionPaymentServiceReplyQueryDetail,
  realtimeCollectionPaymentServiceReplyQueryDetailOri,
} from "@/api/cnaps/beps/385";
import { listPageMixin } from "@/libs/listPageMixin";
import HtAmountInput from "@/views/components/HtAmountInput";
import { amountThousandsFormatter } from "@/utils/table_col_formatter";
export default {
  name: "RealtimeCollectionPaymentServiceReplyQuery",
  mixins: [listPageMixin],
  components: { HtAmountInput },
  data() {
    return {
      defaultEventKey: "defaultEventKey",
      // 查询参数
      queryParams: {
        vdate1: undefined,
        vdate2: undefined,
        startworkdate: undefined,
        endworkdate: undefined,
        idSeqno: undefined,
        payerActno: undefined,
        payeeActno: undefined,
        oriBatchNo: undefined,
        drct: undefined,
      },
      // 搜索
      formOptions: [],
      //
      searchFormDictList: ["DRCTCODE", "Acc_Chg_Flg_Code",
        "PROCESSSTATUS", "PKG_STATUS",
        "TXN_STATUS", "CHECKFLAG",
        "BIZ_TYPE", "BIZ_CTGY", "Cnaps2Dict.REJECTCODE","RegionId"],
      // 列信息
      regConfig: apiUrlConfigQuery,

      tableBindColumns: [
        { prop: "id", label: "交易流水号", width: 180 },
        { prop: "vdate", label: "CPG日期", type: "date", width: 120 },
        { prop: "workdate", label: "工作日期", type: "date", width: 120 },
        {
          prop: "bizTypeCode",
          dictCode: "BIZ_TYPE",
          label: "业务类型",
          width: 180,
        },
        { prop: "drct", label: "来往标识", dictCode: "DRCTCODE", width: 120 },
        { prop: "oriBatchNo", label: "原批序号", width: 120 },
        { prop: "payerActno", label: "付款人账号", width: 180 },
        { prop: "payeeActno", label: "收款人账号", width: 180 },
        { prop: "amount", label: "金额", type: "price", width: 120 },
        { prop: "procStatus", label: "中心状态", dictCode: "PROCESSSTATUS", width: 120 },
      ],

      dictMapAsync: {},
      // 弹出层标题
      title: "",
      restitle: "",
      // 是否显示弹出层
      open: false,
      resopen: false,
      // 表单参数
      detailForm: {},
      resdetailForm: {},
      totalRecord: 0,
      totalPage: 0,
      needCount: 0,
    };
  },
  mounted() {
    const formOptions = [
      // 普通搜索

      {
        type: "dates",
        nameObj: {
          startTimeName: "vdate1",
          endTimeName: "vdate2",
        },
        defaultAttr: {
          size: "small",
          label: "CPG日期",
          placeholder: ["请输入CPG开始日期", "请输入CPG结束日期"],
          format: "yyyy-MM-dd",
          valueFormat: "yyyyMMdd",
        },
      },

      {
        type: "dates",
        nameObj: {
          startTimeName: "startworkdate",
          endTimeName: "endworkdate",
        },
        defaultAttr: {
          size: "small",
          label: "工作日期",
          placeholder: ["请输入工作开始日期", "请输入工作结束日期"],
          format: "yyyy-MM-dd",
          valueFormat: "yyyyMMdd",
        },
      },

      {
        type: "input",
        prop: "idSeqno",
        defaultAttr: {
          size: "small",
          label: "交易流水号",
          placeholder: "请输入交易流水号",
        },
      },

      {
        type: "input",
        prop: "payerActno",
        defaultAttr: {
          size: "small",
          label: "付款人账号",
          placeholder: "请输入付款人账号",
        },
      },

      {
        type: "input",
        prop: "payeeActno",
        defaultAttr: {
          size: "small",
          label: "收款人账号",
          placeholder: "请输入收款人账号",
        },
      },

      {
        type: "input",
        prop: "oriBatchNo",
        defaultAttr: {
          size: "small",
          label: "原批序号",
          placeholder: "请输入原批序号",
        },
      },
      {
        type: "dict",
        dict: "DRCTCODE",
        prop: "drct",
        defaultAttr: {
          size: "small",
          label: "来往标识",
          placeholder: "请输入来往标识",
        },
      },
    ];
    this.formOptions = formOptions;
    this.dictMapAsync = this.getDictMap();
  },
  methods: {
    /***
     * 按钮操作汇总
     */
    /***
     * 按钮操作汇总
     */

    handleAction(type, row = {}) {
      switch (type) {
        case "detail":
          this.handleDetail(row);
          break;
      }
    },

    // 关闭按钮
    cancel() {
      this.open = false;
    },
    rescancel() {
      this.resopen = false;
    },
    /** 原交易明细按钮操作 */
    handleDetail(row) {
      if (row.oriId === null || row.oriId === undefined) {
        row.oriId = "";
      }
      realtimeCollectionPaymentServiceReplyQueryDetailOri(row).then((response) => {
        this.title = " 实时代收代付业务应答查询原交易明细";
        if (response.result !== null && response.result !== undefined) {
          this.detailForm = response.result;
        }
        this.open = true;
      });
    },

    /** 查询明细按钮操作 */
    resDetail(row) {
      realtimeCollectionPaymentServiceReplyQueryDetail(row).then((response) => {
        this.restitle = " 实时代收代付业务应答查询明细";
        this.resdetailForm = response.result;
        this.resopen = true;
      });
    },
  },
};
</script>
<style>
.label-header-msg {
  font-weight: bold;
}

.form-card {
  margin-bottom: 10px;
}
</style>
